﻿using System;
using System.IO;

public static class LuaComponentUtility
{
    public static StreamingAsset GetScriptAsset(string fileName)
    {
        if (fileName == null)
        {
            return null;
        }
        if (string.IsNullOrEmpty(Path.GetExtension(fileName)))
        {
            fileName = fileName + ".lua";
        }
        return StreamingAsset.Get(fileName);
    }
}

